-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: Add dynamic block to define secondary subnets #523
feat!: Add dynamic block to define secondary subnets #523
Conversation
Signed-off-by: Julliano Goncalves <[email protected]>
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
/gcbrun |
@jullianow integration test failing:
|
@imrannayer How can I run these tests? |
@jullianow check this. For test written in go you can use
and
|
…t in the secondary_ip_range block Signed-off-by: Julliano Goncalves <[email protected]>
@imrannayer Adjusted. [root@f7bdcaf7379c workspace]# cft test run TestSecondaryRanges
ok github.com/terraform-google-modules/terraform-google-network/test/integration/secondary_ranges 143.849s |
/gcbrun |
/gcbrun |
1 similar comment
/gcbrun |
/gcbrun |
Any updates on this? |
|
/gcbrun |
I will merge it and test with older version to see if this cause cause any breaking changes. If so we will revert it. |
The current module that manages subnets gives the possibility of creating secondary networks, however in some cases, we simply need to ignore the management of this block.
This is because, for example, when a GKE cluster is created on a subnet that is being managed by Terraform, if that cluster is configured to automatically create secondary networks, this module will attempt to remove these networks.
Therefore, the objective of this change is basically to modify the behavior of the secondary_ip_range block so that it is only defined if the secondary networks were actually defined in code, thus meaning that the block does not exist if the list is empty.
Ref: https://cloud.google.com/kubernetes-engine/docs/concepts/alias-ips#range_management